home *** CD-ROM | disk | FTP | other *** search
- /*-----------------------------------------------------------------
- Copyright ©1994 Steve Israelson
- -----------------------------------------------------------------*/
-
- #pragma once
-
- #include <LView.h>
- #include <LCommander.h>
-
- #include "marathonTypes.h"
-
- class levelView : public LView, public LCommander
- {
- public:
- enum { class_ID = 'mapv' };
- Boolean showGrid, showPoints, showLines, showObjects;
-
- levelData *theLevelData;
- long scaleFactor;
- long offset;
-
- static levelView *CreateViewStream(LStream *inStream);
- levelView(LStream *inStream);
- levelView(const SPaneInfo &inPaneInfo, const SViewInfo &inViewInfo);
- virtual ~levelView();
- virtual void DrawSelf();
- virtual void FinishCreate();
-
- void drawGrid(void);
- void drawObject(short x);
- void setLevelData(levelData*);
- void drawLines(void);
- void drawPoints(void);
- void drawPolygons(void);
- void drawObjects(void);
- void setScale(long newScale, Point);
- void fixImageSize(void);
- PolyHandle makePolyPolygon(long thePoly);
-
- virtual void ClickSelf(const SMouseDownEvent &inMouseDown);
- virtual Boolean ObeyCommand(CommandT inCommand, void *ioParam = nil);
- virtual void FindCommandStatus(CommandT inCommand,
- Boolean &outEnabled, Boolean &outUsesMark,
- Char16 &outMark, Str255 outName);
- };
-